package com.ForeHome.app.Service.Impl;

import com.ForeHome.app.Mapper.ProductImageMapper;
import com.ForeHome.app.Service.ProductImageService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tamll.bean.ProductImage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ProductImageServiceImpl implements ProductImageService {


    @Autowired
    private ProductImageMapper productImageMapper;


    /**
     * 根据商品id 查询该商品相对应的图片
     * @param productimage_product_id 商品id
     * @return 返回查询结果
     */
    @Override
    public List<ProductImage> productimageProductIdSelect(Integer productimage_product_id) {
        QueryWrapper<ProductImage> queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("productimage_product_id",productimage_product_id);
        return productImageMapper.selectList(queryWrapper);
    }
}
